package com.cx.base.day02_数值;

import java.math.BigDecimal;

public class BigDecimalDemo {

    public static void main(String[] args) {
//        amtClassDemo();
        mathClassDemo();
    }

    public static void amtClassDemo(){
        BigDecimal amount = new BigDecimal("4.1233344");
        System.out.println(amount.setScale(2,BigDecimal.ROUND_HALF_DOWN));
    }

    public static void mathClassDemo(){
        float num = -10.3f;
        System.out.println(Math.round(num));
    }

}
